package com.freewater.cargotracker.domain.model.handlingevent;

import com.freewater.cargotracker.domain.model.voyage.VoyageNumber;

public class UnknownVoyageException extends CannotCreateHandlingEventException {

    private static final long serialVersionUID = 1L;

    private VoyageNumber voyageNumber;

    public UnknownVoyageException(VoyageNumber voyageNumber) {
        this.voyageNumber = voyageNumber;
    }

    @Override
    public String getMessage() {
        return "No voyage with number " + voyageNumber.getIdString()
                + " exists in the system";
    }
}
